This invention relates to the field of software engineering, and in particular to a performance monitoring method and system for efficiently monitoring software applications.
Software performance monitoring systems, or profilers, are common in the art. As each function or subroutine is executed, a count is maintained to record how often each routine is executed; in most monitoring systems, the total time spent within each routine is also accumulated, as well as other statistics related to the execution of each routine. The gathered data is processed and presented to the user, generally in the form of histograms and bar charts so that the most often called routines, or the routines that consume the most time, are readily identifiable.
Conventional performance monitoring systems can generally be classified as manually-configured or automated. In a manually-configured performance monitoring system, the software developer specifically includes calls to predefined monitoring functions in selected routines, and the monitoring provides performance statistics for each of the configured routines. In an automated system, the monitoring system automatically includes monitoring functions in each routine.
Manually-configured monitoring systems require the user to determine which routines will be of interest for potentially improving performance, and are generally used when specific parts of an application are known or suspected to be substantial consumers of time and resources that may require further work for improving performance. Such systems are poorly suited for providing an overall assessment of an application's performance to identify possible candidates for improvement.
Automated monitoring systems do not require an a priori identification of candidate routines for improvement, and are generally purposely designed to provide an exhaustive assessment of an application's performance. While automated software performance monitoring systems are generally effective for assessing applications having perhaps a few hundred routines, their effectiveness for assessing large applications having thousands of routines is severely limited.
The reasons for the ineffectiveness of conventional automated monitoring systems for assessing large applications are varied. The time and resources required to monitor each and every routine in a large application can be substantial, and the overhead associated with monitoring and accumulating the performance data can render the application unsuitable for its intended purpose.
Additionally, in any application, there are many ‘core’ routines that are repeatedly executed, and will regularly appear in the histograms and bar charts as routines that significantly affect the performance of the application. However, the fact that these core routines are ‘substantial consumers’ of time or resources may have little bearing on determining how to improve the performance of the application, other than in a theoretical sense. If, for example, an application is data-intensive and the storing and retrieving of data consumes a large portion of time, this consumption may not be a problem, per se, if the time to store or retrieve each block of data is commensurate with the current state of the art. In like manner, arithmetic routines in an application that is computation-intensive can be expected to consume a substantial amount of the application's time, and a high consumption of time would not necessarily be indicative of a problem.
Similarly, beyond the core routines, there may be higher level routines that are known to be designed as well as the state of the art allows, and their regular appearance as substantial consumers on the performance monitoring displays, along with the aforementioned core routines, only serves to obscure the less obvious routines for which performance improvements may be achieved.
Conventional software monitoring systems are also not generally well suited for assessments of ongoing applications that are continually revised and updated. When a new version of an application is to be released, a performance assessment will generally be conducted. In most cases, the results of this analysis are presented to the user, and if the results are not substantially different from the assessment of the prior version, the new version is approved for release. However, such comparisons are often obscured by the presence of all of the aforementioned ‘substantial consumer’ routines, and unless the new release has a significant effect on one of these substantial routines, or introduces a new routine whose consumption approaches the level of these substantial routines, the presence of inefficient routines in the new release will often go unnoticed. Over time, the accumulation of such unnoticed inefficiencies with each release of the application can often result in a degree of inefficiency that necessitates a major rewrite of large portions of the application.
It would be advantageous to provide an automated performance monitoring system that provides for selective monitoring and reporting of routines that affect the performance of an application. It would also be advantageous if the selective monitoring is dynamically configurable. It would also be advantageous if some or all of the selective monitoring is autonomous to the monitoring system. It would also be advantageous if the selective monitoring is based on the selection of routines that are likely to be improvable.
These advantages, and others, can be realized by an application monitoring system that autonomously selects routines for monitoring based on characteristics of the content of the routines. These characteristics are preferably related to aspects of routines that are likely candidates for performance improvement, such as repetitive loops, event waits, synchronized blocks, and on. Routines that appear to be relatively un-improvable are excluded from initial monitoring, and routines that are subsequently certified as being relatively un-improvable are excluded from future monitoring. The determination of each routine's candidacy for monitoring is maintained over time, so that each subsequent monitoring session need not repeat the determinations. Changed routines are routinely re-monitored and/or re-assessed to affirm or modify the routine's candidacy for subsequent monitoring.
This drawing is included for illustrative purposes and is not intended to limit the scope of the invention.